/**
 * 
 */
package com.dalonedrow.module.hq.ui.widgets;

import com.dalonedrow.engine.ui.base.border.BorderFactory;
import com.dalonedrow.engine.ui.base.border.GuiBorder;
import com.dalonedrow.globalvariables.constants.hq.GlobalConstants;

/**
 * @author Donald
 *
 */
public class WidgetFactory {
	/** the singleton instance of {@link WidgetFactory}. */
	private static WidgetFactory	instance;
	/**
	 * Gets the one and only instance of {@link WidgetFactory}.
	 * @return {@link WidgetFactory}
	 */
	public static WidgetFactory getInstance() {
		if (WidgetFactory.instance == null) {
			WidgetFactory.instance = new WidgetFactory();
		}
		return WidgetFactory.instance;
	}
	/**
	 * Hidden constructor.
	 */
	private WidgetFactory() { }
	/**
	 * Gets the {@link HQHeroViewer} border, a grey box with gold edges.
	 * @return {@link GuiBorder}
	 * @throws Exception if an error occurs
	 */
	public GuiBorder getHeroViewerBorder() throws Exception {
		return BorderFactory.getInstance()
				.getBorderEdgeOf8Images4ImageBackground(
				new int[] {
						GlobalConstants.INT_008,
						GlobalConstants.INT_008,
						GlobalConstants.INT_008,
						GlobalConstants.INT_008
				},
				GlobalConstants.STAT_SUB_SCREEN_BORDER_1,
				GlobalConstants
				.STAT_SUB_SCREEN_BORDER_1_MIDDLE,
				GlobalConstants.COL_DB_DARK8,
				GlobalConstants.INT_003,
				GlobalConstants.INT_003);
	}
	/**
	 * Gets the {@link HQHeroViewer} border, a grey box with gold edges.
	 * @return {@link GuiBorder}
	 * @throws Exception if an error occurs
	 */
	public GuiBorder getStatsPanelBorder() throws Exception {
		return BorderFactory.getInstance()
				.getBorderEdgeOf8Images4ImageBackground(
				new int[] {
						GlobalConstants.INT_008,
						GlobalConstants.INT_008,
						GlobalConstants.INT_008,
						GlobalConstants.INT_008
				},
				GlobalConstants.STAT_SUB_SCREEN_BORDER_1,
				GlobalConstants
				.STAT_SUB_SCREEN_BORDER_1_MIDDLE,
				GlobalConstants.COL_DB_DARK8,
				GlobalConstants.INT_003,
				GlobalConstants.INT_003);
	}
}
